<?php
/*
 *   This file is part of Verbum.
 *
 *   poat is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   poat is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with poat.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * 	 Copyright (c) 2008 Sergio Gabriel Teves <gabriel.sgt at gmail.com>
 */
/*ob_start('ob_gzhandler');*/
?>
<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">-->
<html>
	<head>
		<meta name="author" content="Sergio Gabriel Teves" />
		<meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="expires" content="-1" />
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<link rel="shortcut icon" href="images/favicon.ico" />
		<title><?php echo APPLICATION_NAME; ?></title>
		<link rel="stylesheet" type="text/css" href="css/styles.css?v=<?php echo $SYSVER ?>"/>
	</head>
<body scroll="no">
<?php
if (!$islogged and SSL_ENABLE == "true" and $_SERVER['SERVER_PORT']==80) {
	print "<br/><span style='float: right; '><a style='text-decoration: none; color: #ffffff; font-weight: bold;' href='https://".HOST."'><img src='images/silk/shield.png' style='vertical-align:middle;'>&nbsp;<span style='vertical-align:bottom;'>".s("Secure connection available")."</span></a>&nbsp;</span>";
} ?>
<div id="loading-mask" style=""></div>
<div id="loading">
	<div class="loading-indicator"><img src="images/default/shared/loading-balls.gif" width="41" height="9" style="margin-right:8px;" align="absmiddle"/><span id="loading-indicator-text"><?php echo s("Loading..."); ?></span></div>
</div>
<script language="javascript">APPLICATION_NAME='<?php echo APPLICATION_NAME; ?>';</script>
<script language="javascript">
<?php
	include(ROOT_PATH."pages/userscript.php");
?> 
</script>
<script language="javascript">document.getElementById("loading-indicator-text").innerHTML = "<?php echo s("Loading API...")."[1/2]"; ?>";</script>
<!--script type="text/javascript" src="extjs/2.2.1/adapter/ext/ext-base.js"></script-->
<script type="text/javascript" src="jquery/jquery-1.3.1.min.js"></script>
<script type="text/javascript" src="extjs/2.2.1/adapter/jquery/ext-jquery-adapter.js"></script>
<script language="javascript">document.getElementById("loading-indicator-text").innerHTML = "<?php echo s("Loading API...")."[2/2]"; ?>";</script>
<?php if (SCRIPT_DEV_MODE=="true") { ?>		
<script type="text/javascript" src="extjs/2.2.1/ext-all-debug.js"></script>
<?php } else { ?>
<script type="text/javascript" src="extjs/2.2.1/ext-all.js"></script>
<?php } ?>
<script language="javascript">document.getElementById('loading-indicator-text').innerHTML = "<?php echo s("Loading Core..."); ?>";</script>
<?php if ($islogged===true) {
	echo "<script type=\"text/javascript\" src=\"http://www.google.com/jsapi\"></script>";	
}
?>
<?php if (SCRIPT_DEV_MODE=="true") { ?>
<script type="text/javascript" src="extux/menu/EditableItem.js"></script>
<script type="text/javascript" src="extux/menu/RangeMenu.js"></script>
<script type="text/javascript" src="extux/menu/ListMenu.js"></script>
<script type="text/javascript" src="extux/grid/filter/Filter.js"></script>
<script type="text/javascript" src="extux/grid/filter/StringFilter.js"></script>
<script type="text/javascript" src="extux/grid/filter/ListFilter.js"></script>
<script type="text/javascript" src="extux/grid/filter/NumericFilter.js"></script>
<script type="text/javascript" src="extux/grid/GridFilters.js"></script>
<script type="text/javascript" src="extux/Ext.ux.form.BrowseButton.js"></script>
<script type="text/javascript" src="extux/Ext.ux.FileUploader.js"></script>
<script type="text/javascript" src="extux/Ext.ux.UploadPanel.js"></script>
<script type="text/javascript" src="extux/Ext.ux.JsonPanel.js"></script>
<script type="text/javascript" src="extux/ColumnNodeUI.js"></script>
<script type="text/javascript" src="extux/Ext.ux.grid.CheckColumn.js"></script>
<script type="text/javascript" src="extux/filetree/Ext.ux.FileTreeMenu.js"></script>
<script type="text/javascript" src="extux/filetree/Ext.ux.FileTreePanel.js"></script>
<?php } else { ?>
<script type="text/javascript" src="scripts/core.js?v=<?php echo $SYSVER ?>"></script>
<?php } ?>	
<script language="javascript">document.getElementById('loading-indicator-text').innerHTML = "<?php echo s("Initializing..."); ?>";</script>
<?php if (SCRIPT_DEV_MODE=="true") {
$source=ROOT_PATH."js/";
$not = array(".","..","pot",".svn");
$script="";
$dirs=scandir($source);
$lmod = 0;
foreach($dirs as $item) {
	if (!is_dir($item) and in_array($item,$not)===false) {
		echo "<script type=\"text/javascript\" src=\"js/".$item."\"></script>\n";
	}	
}

} else { ?>	
<script type="text/javascript" src="scripts/scripts.js?v=<?php echo $SYSVER ?>"></script>
<?php } ?>	
<?php
if ($islogged===true) {
	echo "<script language=\"javascript\">";
	echo 'google.load("visualization", "1", {packages:["barchart"]});';
	//echo 'google.load("visualization", "1", {packages:["piechart"]});';
	echo "</script>";	
}
?>